 
	<head>
 <style>
  .code-content {
    background-color:ECE9E8;
    border-left:dotted 1pt black;
    border-right:dotted 1pt black;
    border-top:dotted 1pt black;
    border-bottom:dotted 1pt black;
  }
 </style>
 
 </head>
 <h1>&nbsp;EasyEJB User Guide</h1>
	<p><b>A lightweight and easy EJB invocation framework</b><p>
	<font color="#0033CC">version 0.1</font><b><br>
	</b><br>
	<font size="2">&nbsp; Author:Raymond KK He&nbsp;&nbsp;&nbsp;
	<a href="mailto:raymond.kk.he@gmail.com">raymond.kk.he@gmail.com</a><br>
&nbsp; (Current version test with EJB 2.x)<br>
	<br>
	<b>1. What's easyEJB?</b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EasyEJB is a framework for remote EJB invocation 
	just like local java bean.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; You can:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke remote EJB just by providing (jndi,method) 
	and params array.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke remote local EJB just by providing (jndi,method) 
	and params array.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; invoke remote Pojo java bean. (Expose pojo 
	as EJB in a second!)<br>
	<br>
	<b>2. Quick view of usage</b> (See demo code for details):<br>
	<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>1) Invoke a remote EJB<br>
	</b><br>
<div class="code-content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	
	Object[] ags = new Object[] {<font color="#0033CC">&quot;Obama&quot;</font>};
	<font color="#339933">//remote interface class: org.bamboo.easyejb.demo.helloworld.ejb.HelloWorld</font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	Object result = 
	ejbConnection.invokeEJB(<font color="#0033CC">&quot;org.bamboo.easyejb.demo.helloworld.ejb.HelloWorld&quot;</font>,<font color="#0033CC">&quot;sayHello&quot;</font>,ags);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	System.out.println(<font color="#0033CC">&quot;result &quot; </font>+ result);<br>
	</div>
	<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>2) Invoke a remote local EJB (</b>same 
	as remote EJB<b>)</b><br>
	<br>
<div class="code-content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	Object[] ags = <b><font color="#800000">new</font></b> Object[] {<font color="#0033CC">&quot;Beijing&quot;</font>};
	<font color="#339933">//remote interface class: org.bamboo.easyejb.demo.weather.ejb.WetherReport</font> <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	WeatherInfo weatherInfo = (WeatherInfo)ejbConnection.invokeRemoteLocalEJB(<font color="#0033CC">&quot;org.bamboo.easyejb.demo.weather.ejb.WetherReport&quot;</font>,<font color="#0033CC">&quot;getWeatherInfo&quot;</font>,ags);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	System.out.println(<font color="#0033CC">&quot;result:&quot;</font> + weatherInfo.getWeather() +&quot;,&quot; + 
	weatherInfo.getTemperature());<br>
	<br></div>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>3) Invoke a pojo in a remote ejb 
	container.</b><br>
<div class="code-content">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	Object[] args = <font color="#800000"><b>new</b></font> Object[]{new Integer(30),new Integer(39)};<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	Object result = 
	ejbConnection.invokeRemotePojo(<font color="#0033CC">&quot;org.bamboo.easyejb.demo.calculator.pojo.Adder&quot;</font>,
	<font color="#0033CC">&quot;add&quot;</font>,args );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	System.out.println(<font color="#0033CC">&quot;result &quot;</font> + result);<br>
	<br></div>
	<b>3. Senario:</b><br>
	<b>&nbsp;&nbsp;&nbsp; 1) Expose POJO as EJB. </b> </font></p>
	<p><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<b>SCA with RMI protocol: <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </b>converting your legacy pojo components 
	into EJB components in a second and without any configuration!&nbsp; Use it as a SCA wrapper with RMI protocol.<br>
	<br>
	<b>&nbsp;&nbsp;&nbsp; 2) Invoke EJB more easily.</b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A common 
	simple EJB Facade. Program with less code and cosiderations.</font></p>